﻿using System;
using DotNet.HowToUseInterfacesDemo.GoodUse;
using DotNet.HowToUseInterfacesDemo.PoorUse;

namespace DotNet.HowToUseInterfacesDemo
{
    class Program
    {
        public static void Main(string[] args)
        {
            /******************************************************************
            ** 
            **  I strongly believe that understanding interfaces and how to use 
            **  them correctly is an extremely important part to building 
            **  flexible, testable, reusable software. I've seen interface over
            **  used and abused to the point where all they do is complicate
            **  rather than simplify. 
            **  
            **  Interfaces and dependency injection go hand-in-hand in my 
            **  opinion. Use one with out the other, neither will make a lot of 
            **  sense. 
            ** 
            **  I'll start with a poor example of using interfaces and provide 
            **  my thoughts. Then I'll give a demonstration of how I use inter-
            **  faces. 
            **  
            ******************************************************************/

            Console.WriteLine("Using interfaces incorrectly, isn't hard to do. You can still create functional software that works.");
            ImproperUseOfInterfaces.StartHere();
            

            Console.WriteLine("\n\nHowever, with a good understanding of how to use interfaces correctly, in combination with dependency injection, you will be able to create functional software that is both maintainable and easily extendable.");
            
            ProperUseOfInterfaces.StartHere();

            Console.ReadLine();
        }
    }
}
